home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / airfox.swf / scripts / frame_8 / PlaceObject2_312_135 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Encoding:
Text File  |  2006-06-13  |  1.2 KB  |  45 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "bullet3")
  3.    {
  4.       if(direction == 1)
  5.       {
  6.          _Y = _Y + 5;
  7.       }
  8.       if(direction == 2)
  9.       {
  10.          _Y = _Y - 5;
  11.       }
  12.       if(direction == 3)
  13.       {
  14.          _Y = _Y + _root.scrollspeed;
  15.          _X = _X + 5;
  16.       }
  17.       if(direction == 4)
  18.       {
  19.          _Y = _Y + _root.scrollspeed;
  20.          _X = _X - 5;
  21.       }
  22.       if(_X < 0 || 300 < _X || _Y < 0 || 300 < _Y)
  23.       {
  24.          removeMovieClip(this);
  25.       }
  26.       if(this.hitTest(_root.ship) && _root.shippause == 0 && _root.shield == 0)
  27.       {
  28.          _root.ship._alpha = 0;
  29.          _root.explosioncount = _root.explosioncount + 1;
  30.          duplicateMovieClip(_root.explosion,"explosion" + _root.explosioncount,16384 + _root.explosioncount);
  31.          setProperty("_root.explosion" + _root.explosioncount, _X, _root.ship._x);
  32.          setProperty("_root.explosion" + _root.explosioncount, _Y, _root.ship._y);
  33.          if(_root.explosioncount >= 4070)
  34.          {
  35.             _root.explosioncount = 4050;
  36.          }
  37.          _root.shipcount--;
  38.          _root.displaycount = 0;
  39.          _root.dragger._y = -150;
  40.          _root.ship._y = -150;
  41.          removeMovieClip(this);
  42.       }
  43.    }
  44. }
  45.